@@ -65,7 +65,7 @@ class ApplicationController < ActionController::Base |
||
| 65 | 65 |
return {} unless params[:agent]
|
| 66 | 66 |
@agent_params ||= begin |
| 67 | 67 |
options = params[:agent].delete(:options) if params[:agent][:options].present? |
| 68 |
- params[:agent].permit(:memory, :name, :type, :schedule, :disabled, :keep_events_for, :propagate_immediately, :drop_pending_events, |
|
| 68 |
+ params[:agent].permit(:memory, :name, :type, :schedule, :disabled, :keep_events_for, :propagate_immediately, :drop_pending_events, :service_id, |
|
| 69 | 69 |
source_ids: [], receiver_ids: [], scenario_ids: [], controller_ids: [], control_target_ids: []).tap do |agent_params| |
| 70 | 70 |
agent_params[:options] = options if options |
| 71 | 71 |
end |
@@ -205,7 +205,7 @@ describe AgentsController do |
||
| 205 | 205 |
|
| 206 | 206 |
it "creates Agents and accepts specifing a target agent" do |
| 207 | 207 |
sign_in users(:bob) |
| 208 |
- attributes = valid_attributes |
|
| 208 |
+ attributes = valid_attributes(service_id: 1) |
|
| 209 | 209 |
attributes[:receiver_ids] = attributes[:source_ids] |
| 210 | 210 |
expect {
|
| 211 | 211 |
expect {
|